home *** CD-ROM | disk | FTP | other *** search
/ TeX 1995 July / TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO / macros / texsis / beta / PhysRev.txs < prev    next >
Text File  |  1994-03-21  |  11KB  |  262 lines

  1. %% file: PhysRev.txs                              TeXsis version 2.16  
  2. %  $Revision: 0.6 $  :  $Date: 1993/07/26 23:13:14 $  :  $Author: myers $
  3. %======================================================================*
  4. % Physical Review format  --  work in progress
  5. %
  6.  
  7. \ATunlock                                     % use @ as a letter
  8. \emsg{\@comment\ PhysRev: Physical Review journal style}%
  9.  
  10. %======================================================================*
  11. % HEADLINES and FOOTLINES for Physical Review layouts
  12.  
  13. \def\Series{}
  14. \newcount\Volno  \Volno=0       
  15. \newcount\Issueno\Issueno=0
  16. \newcount\Pageno  \Pageno=1             % page number to start on
  17.  
  18. % some extra fonts for headline and footline
  19.  
  20. \font\smallheadfont=cmcsc10
  21. \font\largeheadfont=cmcsc10
  22.  
  23. \headlineoffset=0pt
  24.  
  25.  
  26. \def\VolumeBanner#1#2#3#4{% define the title page header
  27.   \ifx\relax#1\relax\else\def\Series{#1}\fi
  28.   \ifx\relax#2\relax\else\Volno=#2\fi
  29.   \ifx\relax#3\relax\else\Issueno=#3\fi
  30.   \ifx\relax#4\relax\else\Pageno=#4\fi
  31. %
  32.   \ifx\Series{L}%
  33.      \def\@VolumeBanner{\largeheadfont                  %
  34.         Volume \the\Volno, Number \the\Issueno \hss     %
  35.         PHYSICAL REVIEW LETTERS \hss \today}%           %
  36.   \else                                                 %
  37.      \def\@VolumeBanner{PHYSICAL REVIEW #1 \hss         %
  38.           VOLUME \the\Volno, NUMBER \the\Issueno \hss \the\Pageno}%
  39.   \fi}
  40.  
  41.  
  42. \def\@Volume{$\underline{\hbox{{\the\Volno}%
  43.         \vrule height12pt depth2ptwidth\z@}}$}
  44. \def\TitleBanner#1{\def\@TitleBanner{#1}}% for right hand (odd) pages
  45. \def\AuthorBanner#1{\def\@AuthorBanner{#1}}% for left hand (even) pages
  46.  
  47. % defaults are empty
  48.  
  49. \VolumeBanner{}{}{}{}\TitleBanner{}\AuthorBanner{}
  50.  
  51. %======================================================================*
  52.  
  53.  
  54. \superrefsfalse                         % Physical Review's new style now
  55.  
  56.  
  57. \def\PhysRev{%  Physical Review two column layout
  58.    \auxswitchtrue                       % save tags and labels in .aux file
  59.    \refswitchtrue                       % save references in .ref file
  60.    \tenpoint                            % roughly Elite type
  61.    \parindent=1.5em                     % indent about 2 characters
  62.    \parskip=0.5\smallskipamount         % not much skip betwen paragraphs
  63.    \baselineskip=12pt plus 0.5pt        % a little extra stretch for 2 columns
  64. %%   \setbox\strutbox=\hbox{\vrule height8.5pt depth3.5pt width\z@}%
  65.    \hsize=42.5pc \vsize=55\baselineskip %
  66.    \SetDoubleColumns{20.5pc}%           %
  67.    \skip\LFins=1cm   \skip\RFins=1cm    % space above column footnotes
  68.    \skip\footins=0.5cm                  % space above wide footnotes
  69.    \advance\hoffset by -.3in \advance\voffset by -.3in % for this size
  70.    \footlineoffset=12pt
  71. %
  72.    \showchaptIDfalse                    % no chapter number in equation numbers
  73.    \showsectIDfalse                     % no section number in equation numbers
  74.    \def\SectionStyle##1{\uppercase      % section numbers in upper case
  75.          \expandafter{\romannumeral ##1}}%     roman numerals
  76.    \RomanTablestrue                     % roman numerals for table numbers
  77.    \def\Tbf{\twelvepoint\bf}%           % 12pt bold title
  78.    \def\tbf{\tenpoint\bf}%              % 10pt bold section head
  79. %
  80.    \autoparens                          % auto-sizing of parens
  81.    \quoteon                             % automatic begin/end quotes
  82.    \pageno=\Pageno                      % start page numbering on \Pageno
  83. %
  84.    \headline={% headline for Physical Review A, B, C, D, E...
  85.      \ifnum\pageno=\Pageno                      % first page header
  86.        {\largeheadfont \@VolumeBanner}%
  87.      \else\ifodd\pageno                            % right (odd) page header
  88.        {\@Volume \hss \largeheadfont \@TitleBanner \hss \folio}%
  89.      \else                                         % left (even) page header
  90.        {\folio \hss \largeheadfont \@AuthorBanner \hss \@Volume}%
  91.      \fi\fi}
  92. %
  93.    \footline={% copyright claim at bottom of first page
  94.      \ifnum\pageno=\Pageno                      %
  95.         {\tenrm \hbox to\colwidth{\hfill{\@Volume}}\hss %
  96.         \hbox to\colwidth{\folio \hfill         %
  97.              \copyright\ \the\year\ The American Physical Society}}%
  98.      \fi}
  99. }% end \PhysRev
  100.  
  101.  
  102.  
  103. %  The layout of Physical Review Letters is slightly different,
  104. % mostly in how the headlines and footlines are treated
  105.  
  106. \def\PhysRevLett{% 
  107.    \PhysRev     % same as Physical Review, with following changes
  108.    \null\vskip 0.1cm
  109.    \footlineoffset=24pt
  110.    \headline={\hbox{\vbox{\hbox to \pagewidth{\largeheadfont %
  111.         Volume \the\Volno, Number \the\Issueno \hss     %
  112.         PHYSICAL REVIEW LETTERS \hss \today}%
  113.         \vskip 0.32cm\hrule}}}%
  114. %
  115.    \footline={% copyright claim at bottom of first page
  116.      \ifnum\pageno=\Pageno                      %
  117.         {\tenrm \ifodd\pageno\else\rlap{\folio}\fi %
  118.         \hss{\copyright\ \the\year\ The American Physical Society}\hss
  119.         \ifodd\pageno\llap{\folio}\fi}%
  120.      \else
  121.         \ifodd\pageno                         % right (odd) page header
  122.          {\hss \folio}%
  123.         \else                                 % left (even) page header
  124.          {\folio \hss}%
  125.      \fi\fi}
  126. }% end \PhysRevLett
  127.  
  128.  
  129. %======================================================================*
  130. % TITLE material -- modified for Physical Review layout
  131.  
  132. \def\titlepage{\pageno=\Pageno                  % start on page \Pageno
  133.       \let\title=\Title                         %
  134.       \begingroup                               %
  135.       \singlespaced}                            %
  136.  
  137. \def\endtitlepage{\bigskip\endgroup             % some skip and glue
  138.       \vskip 0pt                                % 
  139.       \doublecolumns}                           % start doing double columns
  140.  
  141. \def\author{% first line after as author's name, following lines are address
  142.      \endmode\begingroup                        % end any previous mode
  143.      \let\endmode=\endauthor                    % \endmode will end \author
  144.      \begingroup\obeylines                      % to see author's name
  145.      \PRgetauthor}                              % next line = author's name
  146.  
  147.  
  148. {\obeylines\gdef\PRgetauthor#1
  149.   #2
  150.   {#1\bigskip
  151.      \centerline{\elevenpoint #2}% first line is author's name
  152.      \endgroup                                  % end \obeylines for lookahead
  153.      \raggedcenter\relax                        % fill as you can
  154.      \def\\{\discretionary{}{}{,}}%             % , unless line breaks
  155.      \def\n{\penalty10000}%                     % \n would like to break
  156.      \ninepoint\it                              % rest is affiliation
  157. }}                                              % 
  158.  
  159. \def\endauthor{\vskip 0pt\endraggedcenter\endgroup\smallskip}
  160.  
  161.  
  162. \def\abstract{%
  163.       \bigskip                                  %
  164.       \centerline{(Received \@PUBdate)}         % the date from \pubdate
  165.       \vskip\baselineskip                       % another blank line
  166.       \begingroup                               %
  167.       \leftskip=1in \rightskip=1in              % narrower abstract margins
  168.       \ninepoint}                               % 9 pt type for the text
  169.  
  170. \def\endabstract{\medskip\endgroup}
  171.  
  172.  
  173. %======================================================================*
  174. % REFERENCES:  some differences from Plain TeXsis
  175.  
  176.  
  177. % How to list the references at the end
  178.  
  179. \let\@stdListRefs=\ListReferences               % save usual definition
  180.  
  181. \def\ListReferences{% PhysRev version of \ListReferences
  182.   \enddoublecolumns                     % balance columns so far
  183.    \dimen@=\pagegoal                            % get total page size
  184.    \advance\dimen@ by -\pagetotal               % get page space remaining
  185.    \ifdim\dimen@>0pt\ifdim\dimen@< 1cm\relax    % not enough to look good?
  186.       \vfil\break                               %
  187.    \else                                        %
  188.       \bigskip                                  %
  189.       \line{\hfill \hbox to \colwidth{\hrulefill}\hfill}%
  190.       \bigskip                                  %
  191.    \fi\fi
  192.   \doublecolumns                        % back to double columns for list
  193.   \@stdListRefs}
  194.  
  195.  
  196. % reference text is in slightly smaller type
  197.  
  198. \def\refFormat{\ninepoint}
  199.  
  200. % How to display reference numbers in the list at the end
  201.  
  202. \def\@refitem#1#2{% #2 eats the ^^M
  203.    \vskip 0pt\vfil\penalty-1\vfilneg    % favour breaks here, weakly
  204.    \ifsuperrefs                         % superscript references?
  205.      \message{#1.}%  
  206.      \hangindent1em\hangafter 1   ${}^{#1}$#2 %
  207.    \else                                %
  208.      \message{[#1]}% 
  209.      \refskip\noindent\hskip-\refindent % indent, but write number
  210.      \hbox to \refindent {\hss [#1]\quad}% unindented
  211.      #2
  212.    \fi}
  213.  
  214.  
  215. % use ordinary superscript size for references 
  216.  
  217. \def\citemark#1{\relax                          %
  218.    \ifsuperrefs                                 % superscript references?
  219.      $\relax{}^{\hbox{$\scriptstyle #1\refterminator$}}$\relax % regular size
  220.    \else {}~[{#1}]\relax                        % [reference number]
  221.    \fi}%
  222.  
  223. \def\Ref#1{\use{Ref.#1}}                % don't print ``Ref.~'' with \Ref
  224. \def\refFormat{%
  225.    \def\refskip{\vskip0pt plus 2pt}     % only a little stretch between refs
  226. }
  227.  
  228.  
  229. %======================================================================*
  230. % \PhysRevManuscript is a layout similar to \preprint, but printed
  231. % in \TrueDoubleSpacing and with other things set the way Physical
  232. % Review wants them for submitted manuscripts.
  233.  
  234.  
  235. \def\PhysRevManuscript{% layout for manuscripts to be submitted to journals
  236.    \preprint                    % start with preprint form
  237.    \showchaptIDfalse            % no chapter number in equation numbers
  238.    \showsectIDfalse             % no section number in equation numbers
  239.    \def\SectionStyle##1{\uppercase       % section numbers in upper case
  240.          \expandafter{\romannumeral ##1}}%     roman numerals
  241.    \RomanTablestrue             % roman numerals for table numbers
  242.    \TablesLast                  % tables at the end
  243.    \FiguresLast                 % figures at the end
  244.    \offparens                   % no automatic paren sizing
  245.    \superrefsfalse              % Phys. Rev. has abandoned superscript ref #s
  246.    \def\Tbf{\twelvepoint\bf}%   % 12pt bold title
  247.    \def\tbf{\tenpoint\bf}%      % 10pt bold section head
  248.    \parindent=1em               % indent about 2 characters
  249.    \parskip=\smallskipamount    % not much space between paragraphs
  250.    \def\everysection{\vfill\eject}% start new section on new page
  251.    \gdef\captionspacing{\TrueDoubleSpacing}
  252.    \TrueDoubleSpacing 
  253.    }
  254.  
  255. % Once the Phys. Rev. style file is loaded \Manuscript is specific to
  256. % Physical Review:
  257.  
  258. \let\Manuscript=\PhysRevManuscript
  259.  
  260.  
  261. %>>> EOF PhysRev.txs <<<
  262.